package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.bean.Dish;
import com.itheima.reggie.dto.DishDto;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: 许志民
 * Date: 2021-11-24
 */
public interface DishService extends IService<Dish> {
    void saveDishDto(DishDto dishDto);

    Page<DishDto> findByPage(Integer page, Integer pageSize,String name);


    DishDto findById(Long id);
    @Transactional
    boolean updateBy(DishDto dishDto);

    boolean updateStatus(Integer status, Long[] id);

    boolean deleteids(Long[] ids);

    List<DishDto> getList(Long id);
}
